const renderHeader_purchase = (h, { column, $index }) => {
  // 这里在最外层插入一个div标签
  return h("div", [
    // h即为cerateElement的简写
    // 在div里面插入span
    h("span", {
      // 表示内容
      domProps: {
        innerHTML: column.label,
      },
      on: {
        click: () => {
          console.log(`${column.label}   ${$index}`);
        },
      },
    }),
    h(
      "el-tooltip",
      {
        // 表示属性
        attrs: {
          effect: "dark",
          content: "注释：差异金额=下单金额-账单金额",
          placement: "top",
        },
      },
      [
        h("i", {
          style: "margin-left: 5px;margin-top:-1px;",
          class: "el-icon-question table-msg",
        }),
      ]
    ),
  ]);
}
export const onLineOrderData = {
  columns: [
    { width: '180', label: '结算单号', prop: 'order_sn' },
    { width: '160', label: '账期', prop: 'payment_days' },
    { width: 'auto', label: '结算方式', prop: 'type', slot: true },
    { width: '120', label: '原始单号', prop: 'related_order_order_sn' },
    { width: '120', label: '单据类型', prop: 'order_type', slot: true },
    { width: 'auto', label: '用户名称', prop: 'nickname' },
    { width: 'auto', label: '下单原价', prop: 'order_money' },
    { width: 'auto', label: '配送金额', prop: 'send_money' },
    { width: 'auto', label: '账单号', prop: 'related_order_sn' },
    { width: 'auto', label: '账单金额', prop: 'account_money' },
    { width: 'auto', label: '差异金额', prop: 'diff_money', slot: true, renderHeader: renderHeader_purchase },
    { width: 'auto', label: '制单人', prop: 'admin_user_name', slot: true },
    { width: 'auto', label: '备注', prop: 'remark' },
  ]
}
